from flask import Flask
from configs import config
from apps.users import register_views

def create_app(config_name="dev"):
    app=Flask(__name__)
    app.config.from_object(config[config_name])
    register_views(app)
    print(f'config[config_name]={config[config_name]}')
    return app

